Website and Server Tests

From Kicksecure
Jump to navigation Jump to search

Testing the Kicksecure server with test websites such as hardenize.com / securityheaders.com / Mozilla Observatory / SSL Labs / hstspreload.org.

Introduction[edit]

Security is not a checklist, nor is it simply about having website tests show a lot of green or positive results for features like:

  • SSL certificate
  • HTTP Strict Transport Security (HSTS)
  • Certification Authority Authorization (CAA) Policy
  • Expect-CT header
  • Domain Name System Security Extensions (DNSSEC)
  • Content Security Policy (CSP)
  • Feature-Policy
  • Mail Transfer Agent Strict Transport Security (MTA-STS)
  • SMTP TLS Reporting (TLS-RPT)
  • DNS-based Authentication of Named Entities (DANE)
  • Sender Policy Framework (SPF)
  • DomainKeys Identified Mail (DKIM)
  • Domain-based Message Authentication, Reporting and Conformance (DMARC)
  • Frame Options
  • Cross-Site Scripting (XSS) Protection
  • Content Type Options

While it is nice to have these website or server security features, in a similar fashion to Browser Tests the context is important and there are many false positives.

Quotearchive.org [1] Brian Wolffarchive.org, MediaWiki Developer, Wikimedia (Wikipedia) Security team:

Inserting headers just because some website says so is silly - they should be investigated individually on their merits.

Website test sites like hardenize.com are helpful tools for website owners to check various security features, but these tests say little about the server's actual security. For instance, tests cannot check if: the kernel, operating system and web applications are fully up-to-date or neglected; SSH is configured for public key authentication only; the server is Kicksecure hardened; and whether backups are being made and so forth.

For example, at the time of writing the Microsoft website recorded a "C" rating at securityheaders.com. Further, they did not have a CSP and neither DNSSEC nor DANE were configured. Despite this, the Microsoft website is not routinely hacked so malicious software can be uploaded by unauthorized third parties. [2]

As elaborated in the CSP entry on this page, the threat models are nuanced and Kicksecure does not engage in security theater. While imperfections exist, reasonable efforts are made to improve website security despite constrained resources and developer time. A Comparison of Test Results with Others also helps to put this information into perspective.

Server security issues should not be conflated with software security issues and server downtime is not evidence of a server compromise.

For further information on this topic, see here.

Kicksecure Test Results[edit]

Table: Kicksecure Test Results

Test Site / Feature Result
Email DANE

Email DANE (SMTP)

DNS-based Authentication of Named Entities (DANE) is a bridge between DNSSEC and TLS. In one possible scenario, DANE can be used for public key pinning, building on an existing publicly-trusted certificate. In another approach, it can be used to completely bypass the CA ecosystem and establish trust using DNSSEC alone. Feature not implemented or disabled

Your server doesn't support this feature.

The kicksecure.com website does not offer free or paid email accounts. kicksecure.com only uses email for these purposes:

  • sending emails to wiki editors who signed up to be notified about changes
  • forum email sign-up and notifications
  • developer accounts

DANE should not be relied upon even if email security was perfect and all DANE tests were passed. It is far safer to use end-to-end encryption methods like OpenPGP or even better, codecrypt.

hardenize.com

Forums:

hstspreload.org
SSL Labs

Fingerprint SHA256: 0687260331a72403d909f105e69bcf0d32e1bd2493ffc6d9206d11bcd6770739 Pin SHA256: Vjs8r4z+80wjNcr1YKepWQboSIRi63WsWXhIMN+eWys= RSA 2048 bits (e 65537) / SHA1withRSA Valid until: Thu, 30 Sep 2021 14:01:15 UTC EXPIRED

Weak or insecure signature, but no impact on root certificate
    • No security impact. It’s a non-issue issue besides the annoying warning.
    • Silencing the warning would result in loosing some device support. These devices would TLS errors which would probably cause more alarm than this.
    • See thisarchive.org.
Website DANE See DANE TLSA References. Quote DANE TLSA (DNS-based Authentication of Named Entities) for kicksecure.comarchive.org:

For now decided not to implement it due to:

  • low adaption
  • no support in major browsers
  • complex, maintenance demanding setup

Content Security Policy (CSP)[edit]

Threat Model[edit]

In simple terms, a Content Security Policy (CSP) defines server instructions for what resources can be loaded by client browsers and from where. The OWASP Foundationarchive.org provides more detail:

Is a W3C specification offering the possibility to instruct the client browser from which location and/or which type of resources are allowed to be loaded. To define a loading behavior, the CSP specification use “directive” where a directive defines a loading behavior for a target resource type. Directives can be specified using HTTP response header (a server may send more than one CSP HTTP header field with a given resource representation and a server may send different CSP header field values with different representations of the same resource or with different resources) or HTML Meta tag, the HTTP headers below are defined by the specs:

One use of a CSP is for web server software (like nginx) to tell the visitor's browser (such as Mozilla Firefox) what resources (like HTML, JavaScript and images) to load from which authorized sources. This is an interesting, nuanced threat model. At first sight it appears improbable that a CSP running on web server software can provide additional security for the software itself. However, modern web applications are very complex and prone to software bugs and security vulnerabilities.

Consider the following example. A certain web application might not be functioning as expected due to a bug, or it may even be compromised because an attacker exploited an existing vulnerability. However, a compromised web application does not necessarily lead to a compromise of the web server software (like nginx), let alone a whole server (root) compromise. That is, the web server software might still function according to specifications. Under these conditions, a CSP can limit what the web application -- or more accurately, what the results of the output of the web application processed by the visitor's browser -- can do. For example, a CSP enforced by the web server software can prohibit [3] the browser from loading content from third party websites. In some cases, web application vulnerabilities might be rendered completely harmless or made less useful due to a CSP's ability to contain faulty or compromised web applications. [4]

Another good CSP use case concerns webmail, that is, reading email in a browser. For better security and privacy, all content from third party websites should be prohibited while content from the email provider is allowed. Even if this is in place, it is far safer to follow the Kicksecure recommendation to avoid webmail entirely, and instead use an email client that has disabled all HTML and scripts (text-only mails).

Forum discussion: Content-Security-Policy now deployed on Kicksecure websitesarchive.org

Kicksecure CSP[edit]

kicksecure.com has an essential CSP. This is useful for the kicksecure.com onion domain since it avoids loading resources from the kicksecure.com clearnet domain and causing browser mixed content warnings. It is also helpful in avoiding clearnet connections for visitors who prefer the onion version of the Kicksecure website. The reason is modern web applications are not designed for use on multiple domain names with the same database backend and/or for use with onion domains in general.

However, kicksecure.com does not yet have a CSP without 'unsafe-inline' and 'unsafe-eval' for all web applications:

  • This policy contains 'unsafe-inline' which is dangerous in the script-src directive.
  • This policy contains 'unsafe-eval' which is dangerous in the script-src directive.
  • This policy contains 'unsafe-inline' which is dangerous in the style-src directive.

Users who have NoScript enabled in their browser are unaffected.

Rather than relying on websites to deploy CSP, users should habitually use secure browsers, compartmentalize browsing in different virtual machines (VMs), harden their operating system, use Kicksecure, and utilize NoScript. The widespread and perfect deployment of CSP is unlikely to happen soon, if ever. Kicksecure and Whonix are real efforts aimed at improving security and privacy; limited developer time and resources mean only reasonable efforts are focused on CSP at present.

Kicksecure CSP Test Results[edit]

Table: Kicksecure CSP Test Results

Domain Result
Homepage
Forums
Wiki [5]

Adding additional policies can only further restrict the capabilities of the protected resource

gzip[edit]

gzip is only relevant to performance and not security.

To confirm, run curl gzip test instructionsarchive.org.

torsocks curl -H "Accept-Encoding: gzip" --head http://dds6qkxpwdeubwucdiaord2xgbbeyds25rbsgr73tbfpqpt4a6vjwsyd.onion/wiki/Documentation

The output includes the following.

Content-Encoding: gzip

Comparison with Others[edit]

Before making suggestions about features the kicksecure.com website should implement, please conduct research on much better funded organizations for a fair comparison. [6] See:

See Also[edit]

Footnotes[edit]

  1. The CSP is actually a recommendation for the browser. However, writing the following would be confusing:

    For example a CSP enforced by the web server software can recommend the browser to not load content from external websites and the browser would honor this advice.

  2. Of course it would be better to completely avoid faulty applications or compromises in the first place, but it is impossible to make this judgement in advance.
  3. The following CSP is under consideration; it was previously enabled, so this advice is not current. $wgCSPHeaderarchive.org

    It is not compatible with $wgUseFileCache

    Wiki users who are not logged in have 1 CSP, the essential CSP (by nginx). (Except for visitors of pages which are not yet cached.)

    Wiki users who are logged in have 2 CSPs, the essential CSP and on top of it the CSP generated by the mediawiki webapp setting $wgCSPHeader.

  4. Limited Kicksecure resources make some features infeasible.

We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 12 year success story and maybe DONATE!